<!DOCTYPE html>
<!--
    Test that the ::first-line background is repainted at the new position when its block is moved.
    There should be no red below.
-->
<script src="../../resources/ahem.js"></script>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script src="resources/text-based-repaint.js"></script>
<style>
    body { font:20px Ahem; }
    .test { color:green; }
    .test::first-line { background:red; }
</style>
<div id="spacer" style="display:none; height:3em;"></div>
<div class="test">JOCULAR</div>
<script>
repaintTest = function() {
    document.getElementById("spacer").style.display = "block";
}
runAfterLayoutAndPaint(function() {
    runRepaintAndPixelTest();
});
</script>
